package cn.tedu.autoshow.website.pojo.param;

import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Range;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

@Accessors(chain = true)
@Data
public class AutoShowUpdateInfoParam {
    @NotNull(message = "添加车展场次失败，必须提交车展标题！")
    private String title;


    private String description;

    @NotNull(message = "添加车展场次失败，必须提交车展开始时间！")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;
    @NotNull(message = "添加车展场次失败，必须提交车展结束时间！")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;
    @NotNull(message = "添加车展场次失败，必须提交车展购票时间！")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime buyTime;

    @NotNull(message = "添加车展场次失败，必须提交车展场退票截止时间！")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime returnTime;

    @NotNull(message = "添加车展场次失败，必须提交车展票价！")
    private Double price;

    @Range(min=0,max = 1,message = "添加车展场次失败,启用值在0-1之间")
    @NotNull(message = "添加车展场次失败，必须提交车展是否启用！")
    private Integer enable;

}
